<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//根路由
Route::get('/', 'Home\IndexController@index');

//用户是否登录
Route::get('/online/user/isAlive','Home\IndexController@isAlive');
//前台用户登录
Route::get('/home/public/login','Home\PublicController@login');
//前台用户短信验证登录
Route::post('/online/user/loginByCode','Home\PublicController@loginCode');
//前台用户注册
Route::get('/home/public/register','Home\PublicController@register');
Route::get('/web/html/register.html','Home\PublicController@register');
//前台注册，验证手机号码
Route::post('/online/user/valiAccount','Home\PublicController@valiAccount');
//前台手机号注册
Route::post('online/user/phoneRegist','Home\PublicController@phoneRegist');
//发送短信验证码
Route::post('/online/verificationCode/sendmessage','Home\PublicController@validateSmsCode');
//前台登录验证地址
Route::post('/home/public/checkLogin','Home\PublicController@checkLogin');
//前台退出登录
Route::get('/online/user/logout','Home\PublicController@logout');

//获取直播列表的路由
Route::get('/getLiveList','Home\IndexController@getLiveList');
//获取专业列表的路由
Route::post('/getProList','Home\IndexController@getProList');
//直播播放页面路由
Route::get('/live/{id}', 'Home\LiveController@play');
//专业详情/购买页
Route::get('/buy/detail/{id}', 'Home\BuyController@detail');
//专业详情/购买确认路由
Route::get('/buy/makeOrder/{id}', 'Home\BuyController@makeOrder');
//专业微信支付
Route::get('/payWithWx/{id}', 'Home\BuyController@payWithWx');


Route::get('/index/getIndexPopup','Home\IndexController@getIndexPopup');

//获取页面元素
Route::get('/seo/getPageMetadata','Home\IndexController@getPageMetadata');
//顶部消息通知
Route::get('/online/message/findNewestNotice','Home\IndexController@findNewestNotice');
//获取导航栏
Route::post('/careerPath/careerPathList','Home\IndexController@careerPathList');
//获取左侧导航分类
Route::get('/index/getIndexSubjectAndCourse','Home\IndexController@getBannerNavLeft');
//获取轮播图
Route::get('/banner/getBannerList','Home\IndexController@getSliderBannerNav');
//更新轮播图点击量
Route::post('/banner/updateClickCount','Home\CourseController@updateClickCount');
//获取培训课程
Route::get('/courseIntroduction/getCourseIntroductionList','Home\IndexController@getCourseIntroductionList');
//获取电影，会员
Route::get('/index/getIndexCareerCourse/protype_id/{profession_id}','Home\IndexController@getFilmAndMember');
//获取剧集,综艺,培训课堂
Route::get('/index/selectSitcom/protype_id/{protype_id}','Home\IndexController@getSitcom');
//推荐直播
Route::get('/RecommendedLivebroadcast/listByIndex','Home\IndexController@listByIndex');
//搜索展示页
Route::get('/search/{keyword?}','Home\IndexController@search');
//搜索结果
Route::get('/search/courseSearch/pageNumber/{pageNumber}/keyword/{keyword}/searchCourseBelong/{searchCourseBelong}/pageSize/{pageSize}','Home\IndexController@courseSearch');
//首页购物车商品数量
Route::get('/shoppingCart/findCourseNum','Home\IndexController@getCartNum');
//首页未读消息总数
Route::get('/online/message/findMessageCount','Home\IndexController@getMessageCount');


//精品微课
Route::get('/course/class/classType/{classType?}','Home\LessionController@fineClass');
//分类导航
Route::get('/course/getDirections','Home\CourseController@getDirections');
Route::get('/course/getDirectionsNav','Home\ProtypeController@getDirectionsNav');
//获取精品微课的列表
Route::get('/course/getMicroCourses/pageNumber/{pageNumber?}/pageSize/{pageSize}/directionId/{directionId?}/orderType/{orderType?}/classType/{classType?}','Home\LessionController@getMicroCourses');
//视频详情播放页
Route::get('/course/detail/courseId/{id}','Home\CourseController@videoPlay');
//课程介绍详情页
Route::get('/class/detail/{id}','Home\CourseController@courseIntroduction');
//获取课程介绍详情
Route::get('/course/getCourseById/{id}','Home\CourseController@getCourseIntroduction');
//直播详情页
Route::get('/live/detail/{id}','Home\CourseController@livePlay');
//详情页中获取推荐课程
Route::get('/course/getRecommendCourseByCourseId','Home\CourseController@getRecommendCourse');

//视频目录
Route::get('/coursePlay/getCourseKnowledgeTree','Home\CourseController@getVideoTree');
//演员/讲师信息
Route::get('/coursePlay/getLecturers','Home\CourseController@getLecturers');

//视频播放地址
Route::get('/coursePlay/getCourseCurrentVideo','Home\LessionController@getVideo');
//问答权限
Route::get('/questionElf/checkQuestionPermission','Home\LessionController@checkAsk');
//笔记
Route::get('/courseStudyCenter/queryNotesPage','Home\LessionController@getNotes');


//测试豆瓣
Route::get('/douban/{type}','Home\IndexController@douban');
Route::get('/course/getDirectionsDouban','Home\IndexController@getDirectionsDouban');
Route::get('/course/getMicroCoursesDouban','Home\IndexController@getMicroCoursesDouban');
Route::get('/course/getMicroCoursesDetailDouban','Home\IndexController@getMicroCoursesDetailDouban');

//测试图像识别（百度）
Route::get('/testA','Home\IndexController@testA');
//测试html解析
Route::get('/testB','Home\IndexController@testB');
Route::get('/testC','Home\IndexController@testC');
Route::get('/testD','Home\IndexController@testD');



//主播个人主页
Route::get('/web/storyDetail/{id}','Home\PerformerController@index');
//主播个人详情
Route::get('/studentStory/detail','Home\PerformerController@detail');
//推荐主播列表
Route::get('/studentStory/listByIndex','Home\PerformerController@listByIndex');

//片库
Route::get('/class','Home\CourseController@index');
Route::get('/course/getProfessionCourses','Home\CourseController@getProfessionCourses');



//后台路由地址
//登录页面的路由
Route::get('/admin/public/login','Admin\PublicController@login') -> name('login');
//后台登录验证地址
Route::post('/admin/public/checkLogin','Admin\PublicController@checkLogin');
Route::any('/admin/public/md5','Admin\PublicController@md5');

//后台需要验证的路由都放到一个群组里
Route::group(['middleware' => ['auth:admin','checkrbac']], function() {
    //后台首页页面显示路由
    Route::get('/admin/index/index','Admin\IndexController@index');
    Route::get('/admin/index/welcome','Admin\IndexController@welcome');

    //退出路由
    Route::get('/admin/public/logout','Admin\PublicController@logout');

    //添加公告
    Route::any('/admin/article/add','Admin\ArticleController@add');

    //系统管理
    Route::get('/admin/system/system_log','Admin\SystemController@system_log');

    //管理员管理
    Route::get('/admin/admin/index','Admin\AdminController@index');
    Route::get('/admin/admin/async/{mark?}','Admin\AdminController@async');

    //权限管理
    Route::any('/admin/auth/add','Admin\AuthController@add');
    Route::get('/admin/auth/index','Admin\AuthController@index');

    //角色管理
    Route::get('/admin/role/index','Admin\RoleController@index');
    Route::any('/admin/role/assignAuth','Admin\RoleController@assignAuth');

    //会员管理
    Route::get('/admin/member/index','Admin\MemberController@index');
    Route::any('/admin/member/add','Admin\MemberController@add');
    Route::any('/admin/member/edit','Admin\MemberController@edit');
    Route::post('/admin/member/del','Admin\MemberController@del');


    //演员管理
    Route::get('/admin/performer/index','Admin\PerformerController@index');
    Route::any('/admin/performer/add','Admin\PerformerController@add');
    Route::any('/admin/performer/edit','Admin\PerformerController@edit');
    Route::post('/admin/performer/del','Admin\PerformerController@del');
    Route::post('/admin/performer/search','Admin\PerformerController@search');

    //上传操作
    Route::post('/admin/upload/img_default','Admin\UploadController@img_default');
    Route::post('/admin/upload/qiniu','Admin\UploadController@qiniu');
    Route::post('/admin/upload/video','Admin\UploadController@video');

    //分类的管理
    Route::get('/admin/protype/index','Admin\ProtypeController@index');
    Route::any('/admin/protype/add','Admin\ProtypeController@add');
    Route::any('/admin/protype/edit','Admin\ProtypeController@edit');
    Route::post('/admin/protype/del','Admin\ProtypeController@del');
    Route::post('/admin/protype/search','Admin\ProtypeController@search');

    Route::get('/admin/profession/index','Admin\ProfessionController@index');
    Route::any('/admin/profession/add','Admin\ProfessionController@add');
    Route::any('/admin/profession/edit','Admin\ProfessionController@edit');
    Route::post('/admin/profession/del','Admin\ProfessionController@del');
    Route::any('/admin/profession/search','Admin\ProfessionController@search');

    //课程及点播的管理
    Route::get('/admin/course/index','Admin\CourseController@index');
    Route::any('/admin/course/add','Admin\CourseController@add');
    Route::any('/admin/course/edit','Admin\CourseController@edit');
    Route::any('/admin/course/edit_status','Admin\CourseController@edit_status');
    Route::post('/admin/course/del','Admin\CourseController@del');
    Route::any('/admin/course/search','Admin\CourseController@search');
    Route::get('/admin/course/get_profession','Admin\CourseController@get_profession');
    Route::get('/admin/course/get_lessions','Admin\CourseController@get_lessions');

    Route::get('/admin/lession/index','Admin\LessionController@index');
    Route::any('/admin/lession/add','Admin\LessionController@add');
    Route::any('/admin/lession/edit','Admin\LessionController@edit');
    Route::post('/admin/lession/del','Admin\LessionController@del');
    Route::post('/admin/lession/search_course_name','Admin\LessionController@searchcname');
    Route::get('/admin/lession/play','Admin\LessionController@play');

    //试卷部分
    Route::get('/admin/paper/index','Admin\PaperController@index');//试卷列表
    Route::get('/admin/question/index','Admin\QuestionController@index');//试题列表
    Route::get('/admin/question/export','Admin\QuestionController@export');//试题导出
    Route::any('/admin/question/import','Admin\QuestionController@import');//试题导入

    //直播部分
    Route::get('/admin/stream/index','Admin\StreamController@index');//直播流列表
    Route::any('/admin/stream/add','Admin\StreamController@add');//直播流添加
    Route::get('/admin/live/index','Admin\LiveController@index');//直播课程列表

    //商品管理
    Route::get('/admin/item/index','Admin\ItemController@index');
    Route::get('/admin/item/detail','Admin\ItemController@detail');
    Route::any('/admin/item/add','Admin\ItemController@add');
    Route::any('/admin/item/edit','Admin\ItemController@edit');
    Route::any('/admin/item/edit_status','Admin\ItemController@edit_status');
    Route::post('/admin/item/del','Admin\ItemController@del');
    Route::any('/admin/item/search','Admin\ItemController@search');

    //商品图片管理
    Route::any('/admin/item_img/add','Admin\Item_imgController@add');
    Route::post('/admin/item_img/del','Admin\Item_imgController@del');

    //商品库存管理
    Route::post('/admin/item_stock/edit_stock','Admin\Item_stockController@edit_stock');
    Route::post('/admin/item_stock/edit_img','Admin\Item_stockController@edit_img');
    Route::any('/admin/item_stock/add','Admin\Item_stockController@add');
    Route::post('/admin/item_stock/del','Admin\Item_stockController@del');

    //商品属性管理
    Route::any('/admin/item_attribute/add','Admin\Item_attributeController@add');
    Route::post('/admin/item_attribute/del','Admin\Item_attributeController@del');

    //商品首页顶部轮播图管理
    Route::get('/admin/item_sowing_map/getOne','Admin\Item_sowing_mapController@getOne');
    Route::post('/admin/item_sowing_map/edit','Admin\Item_sowing_mapController@edit');

    //商品首页热点管理
    Route::get('/admin/item_tags/getOne','Admin\Item_tagsController@getOne');
    Route::post('/admin/item_tags/edit','Admin\Item_tagsController@edit');


    //商品分类
    Route::get('/admin/classification/index','Admin\ClassificationController@index');
    Route::any('/admin/classification/add','Admin\ClassificationController@add');
    Route::any('/admin/classification/edit','Admin\ClassificationController@edit');
    Route::any('/admin/classification/edit_status','Admin\ClassificationController@edit_status');
    Route::post('/admin/classification/del','Admin\ClassificationController@del');
    Route::any('/admin/classification/search','Admin\ClassificationController@search');

    //商品属性管理
    Route::get('/admin/attribute/index','Admin\AttributeController@index');
    Route::any('/admin/attribute/add','Admin\AttributeController@add');
    Route::any('/admin/attribute/edit','Admin\AttributeController@edit');
    Route::post('/admin/attribute/del','Admin\AttributeController@del');
    Route::any('/admin/attribute/search','Admin\AttributeController@search');

    //七牛云管理
    Route::get('/admin/Qiniu/index','Admin\QiniuController@index');
});
